{
  "name"    : "showcase",

  "include" :
  [
    {
      "path" : "${QOOXDOO_PATH}/tool/data/config/application.json"
    }
  ],
  
  "default-job" : "source",

  "let" :
  {
    "APPLICATION"  : "showcase",
    "QOOXDOO_PATH" : "../..",
    "QXTHEME"      : "showcase.theme.Theme",
    "LOCALES"      : [ 
      "en", "en_GB", "en_US", 
      "de", "de_DE", "de_AT", 
      "es", "es_ES", "es_MX", 
      "ro", "ro_RO",
      "sv", "sv_SE",
      "cs",
      "pt"
    ],
    "ROOT"         : "."
  },

  "config-warnings" : 
  {
    "job-shadowing" : ["build-files", "common", "translation"],
    
    "environment" : [ "non-literal-keys" ]
  },

  "jobs" :
  {
    "common" :
    {
      "library" : 
      [
        {
          "manifest"   : "${QOOXDOO_PATH}/component/library/formdemo/Manifest.json"
        },
        {
          "manifest"   : "${QOOXDOO_PATH}/component/library/datademo/Manifest.json"
        },
        {
          "manifest" : "${QOOXDOO_PATH}/component/library/versionlabel/Manifest.json"
        },
        {
          "manifest" : "${QOOXDOO_PATH}/component/library/indigo/Manifest.json"
        }
      ],
      
      "environment" :
      {
        "qx.mobile.nativescroll" : true
      },
      
      "packages" : 
      {
        "parts" : 
        {
          "boot": 
          {
            "include" : ["${QXTHEME}", "showcase.Application"]
          },
          "theme": 
          {
            "include" : ["showcase.page.theme.Content"]
          },
          "table": 
          {
            "include" : ["showcase.page.table.Content"]
          },
          "form": 
          {
            "include" : ["showcase.page.form.Content"]
          },
          "virtuallist": 
          {
            "include" : ["showcase.page.virtuallist.Content"]
          },
          "data": 
          {
            "include" : ["showcase.page.databinding.Content"]
          },
          "dragdrop": 
          {
            "include" : ["showcase.page.dragdrop.Content"]
          },
          "tree": 
          {
            "include" : ["showcase.page.tree.Content"]
          },
          "htmleditor": 
          {
            "include" : ["showcase.page.htmleditor.Content"]
          },
          "i18n": 
          {
            "include" : ["showcase.page.i18n.Content"]
          }
        },
        "sizes" : 
        {
          "min-package" : 10
        } 
      }
    },
    
    "build-files" :
    {
      "copy-files" :
      {
        "=files" : ["index.html", "blank.html", "resource/static", "indigo/css/fonts"]
      }
    },
    
    "translation" :
    {
      "translate" : { "poentry-with-occurrences" : false  }
    },
    
    "common-image" :
    {
      "let" :
      {
        "SOURCE" : "source/resource/source",
        "THEME_PATH" : "source/resource/showcase/theme",
        "THEME_PREFIX" : "source/resource",
        "DEST" : "../showcase/theme"
      }
    },


    "image-clipping" :
    {
      "extend" : ["common-image"],

      "slice-images" :
      {
        "images" :
        {          
          "${SOURCE}/button.png" :
          {
            "prefix" : "${DEST}/button",
            "border-width" : 6
          },
        
          "${SOURCE}/button-pressed.png" :
          {
            "prefix" : "${DEST}/button-pressed",
            "border-width" : 6
          },
          
          "${SOURCE}/display.png" :
          {
            "prefix" : "${DEST}/display",
            "border-width" : 6
          },
          
          "${SOURCE}/window.png" :
          {
            "prefix" : "${DEST}/window",
            "border-width" : 10
          }  
        }       
      }
    },


    "image-combine" :
    {
      "extend" : ["common-image"],

      "combine-images" :
      {
        "images" :
        {
          "${THEME_PATH}/button-combined-tb.png":
          {
            "prefix" : ["${THEME_PREFIX}"],
            "input"  :
            [{
              "prefix" : ["${THEME_PREFIX}"],
              "files": [ 
                "${THEME_PATH}/button-[tb]*.png",
                "${THEME_PATH}/button-pressed-[tb]*.png"
               ]
            }],
            "layout" : "vertical"
          },
          

          "${THEME_PATH}/button-combined-lr.png":
          {
            "prefix" : ["${THEME_PREFIX}"],
            "input"  :
            [{
              "prefix" : ["${THEME_PREFIX}"],
              "files": [ 
                "${THEME_PATH}/button-[lr].png",
                "${THEME_PATH}/button-pressed-[lr].png"
               ]
            }],
            "layout" : "horizontal"
          },
          
          
          "${THEME_PATH}/display-combined-tb.png":
          {
            "prefix" : ["${THEME_PREFIX}"],
            "input"  :
            [{
              "prefix" : ["${THEME_PREFIX}"],
              "files": [ 
                "${THEME_PATH}/display-[tb]*.png"
               ]
            }],
            "layout" : "vertical"
          },
          
          "${THEME_PATH}/display-combined-lr.png":
          {
            "prefix" : ["${THEME_PREFIX}"],
            "input"  :
            [{
              "prefix" : ["${THEME_PREFIX}"],
              "files": [ 
                "${THEME_PATH}/display-[lr].png"
               ]
            }],
            "layout" : "horizontal"
          },
          

          "${THEME_PATH}/window-combined-tb.png":
          {
            "prefix" : ["${THEME_PREFIX}"],
            "input"  :
            [{
              "prefix" : ["${THEME_PREFIX}"],
              "files": [ 
                "${THEME_PATH}/window-[tb]*.png"
               ]
            }],
            "layout" : "vertical"
          },
          
          "${THEME_PATH}/window-combined-lr.png":
          {
            "prefix" : ["${THEME_PREFIX}"],
            "input"  :
            [{
              "prefix" : ["${THEME_PREFIX}"],
              "files": [ 
                "${THEME_PATH}/window-[lr].png"
               ]
            }],
            "layout" : "horizontal"
          }                  
        }
      }
    },
    
    // putting it all together ...
    "image" :
    {
      "run" :
      [
        "image-clipping",
        "image-combine"      
      ]
    }    
  }
}
